#include "StdAfx.h"
#include "dentityfactory.h"

DEntityFactory::DEntityFactory(QObject *parent)
	: QObject(parent)
{

}

DEntityFactory::~DEntityFactory()
{

}

DEnumEntity* DEntityFactory::createEnumEntity()
{
	return new DEnumEntity;
}

DVariableEntity* DEntityFactory::createVariableEntity(const QString& name, const QString& type, Access access)
{
	DVariableEntity* pVar = new DVariableEntity;
	pVar->setName(name);
	pVar->setAccess(access);
	pVar->setType(type);
	return pVar;
}

DMethodEntity* DEntityFactory::createMethodEntity()
{
	return new DMethodEntity;
}

DClassEntity* DEntityFactory::createClassEntity(ClassType eClassType, const QString& className,
												Access inheritingAccess)
{
	DClassEntity* pClassEntity = new DClassEntity(eClassType);
	pClassEntity->setName(className);
	pClassEntity->setAccess(inheritingAccess);
	return pClassEntity;
}